package org.phalanx.map;

public class MapCoordinates {
	Integer xValue;
	Integer yValue;
	
	public MapCoordinates(Integer xValue, Integer yValue){
		this.xValue = xValue;
		this.yValue = yValue;
	}
	
	public Integer getX(){
		return xValue;
	}
	
	public Integer getY(){
		return yValue;
	}
	
	public void setX(Integer xValue){
		this.xValue = xValue;
	}
	
	public void setY(Integer yValue){
		this.yValue = yValue;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((xValue == null) ? 0 : xValue.hashCode());
		result = prime * result + ((yValue == null) ? 0 : yValue.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final MapCoordinates other = (MapCoordinates) obj;
		if (xValue == null) {
			if (other.xValue != null)
				return false;
		} else if (!xValue.equals(other.xValue))
			return false;
		if (yValue == null) {
			if (other.yValue != null)
				return false;
		} else if (!yValue.equals(other.yValue))
			return false;
		return true;
	}
}
